{% set visit = get_total_visit(request.state.config.cf_visit) %}
{% if visit %}
    <section id="visit" class="position-relative main-bg rounded-4 overflow-hidden text-white w-100 mt-md-4">
        <h2 class="fs-4 p-4 border-white">联系理货</h2>
        <ul class="p-4">
            <li class="d-flex justify-content-between fs-5 py-2">
            <span class="col-6 position-relative ps-4">今天</span>
            <strong class="col-6 text-end text-white">{{ visit.today|number_format }}</strong>
            </li>
            <li class="d-flex justify-content-between fs-5 py-2">
            <span class="col-6 position-relative ps-4">昨天</span>
            <strong class="col-6 text-end text-white">{{ visit.yesterday|number_format }}</strong>
            </li>
            <li class="d-flex justify-content-between fs-5 py-2">
            <span class="col-6 position-relative ps-4">最大值</span>
            <strong class="col-6 text-end text-white">{{ visit.max|number_format }}</strong>
            </li>
            <li class="d-flex justify-content-between fs-5 py-2">
            <span class="col-6 position-relative ps-4">已满</span>
            <strong class="col-6 text-end text-white">{{ visit.total|number_format }}</strong>
            </li>
        </ul>
        {% if request.state.is_super_admin %}
            <a href="/admin/visit_list" class="btn_admin btn">
                <i class="fa fa-cog fa-spin fa-fw"></i>
                <span class="blind">经理</span>
            </a>
        {% endif %}
    </section>
{% endif %}